﻿<%@ Page Language="C#" MasterPageFile="~/member/UserManage.master" AutoEventWireup="true"
    CodeFile="FavoriteList.aspx.cs" Inherits="member_Trade_FavoriteList" Title="我的收藏" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContInfo" runat="server">

    <script type="text/ecmascript">
        function SelectAll()
        {
            // 找到所有的 input 元素
            var ctllist = document.getElementsByTagName("input");
            var objcheckbox= document.getElementById("CheckBox2");     
            for( var i = 0; i< ctllist.length; i++)
            {
                if(ctllist[i].type == "checkbox" && ctllist[i].name.indexOf( "CheckBox1") >=0 )
                {   
                    if(objcheckbox.checked==true)     
                         ctllist[i].checked = true;
                    else
                         ctllist[i].checked = false;
                }
          
             }
         }
    </script>

    <form id="form1">
        <div id="sub_content">
            <div class="pagetitle">
                我的收藏</div>
            <div class="tishi">
                <span>提&nbsp;示：</span>·请慎重选择是否删除
            </div>
            <div class="main_Supply_nav">
                <ul id="menu">
                    <li id="menu1" runat="server"><a href="FavoriteList.aspx?content_type=Supply">供应信息</a>
                    </li>
                    <li id="menu2" runat="server"><a href="FavoriteList.aspx?content_type=Purchase">求购信息</a></li>
                    <li id="menu3" runat="server"><a href="FavoriteList.aspx?content_type=Company">公司信息</a></li></ul>
            </div>
            <asp:Panel ID="pnlSupply" runat="server">
                <asp:DataList ID="dlstSupply" runat="server" RepeatColumns="1" SeparatorStyle-BorderWidth="0"
                    DataKeyField="ID" CssClass="fl">
                    <ItemTemplate>
                        <table width="795" cellpadding="0" cellspacing="0" border="0" class="table_main1">
                            <tr>
                                <td width="50" align="center">
                                    <asp:CheckBox ID="CheckBox1" runat="server" /></td>
                                <td width="120" align="center">
                                    <a href="<%=WebUrl %>Supply/Detail.aspx?ID=<%# Eval("ProductID") %>" target="_blank">
                                        <asp:Image ID="Image1" runat="server" ImageUrl='<%# Base.Common.ProcessAbsoluteUrl(Eval("Picture_1").ToString())%>'
                                            Width="80px" Height="80px" /></a></td>
                                <td width="250" align="center">
                                    <a href="<%=WebUrl %>Supply/Detail.aspx?ID=<%# Eval("ProductID") %>" target="_blank">
                                        <%# Eval("Name")%>
                                    </a>
                                    <br />
                                    <a href="<%=WebUrl %>Shops/Index/<%# Eval("LoginName") %><%=Rewrite %>" target="_blank">
                                        <%# Eval("CompanyName")%>
                                    </a>
                                </td>
                                <td align="center" width="243">
                                    &nbsp;<%# Eval("Place")%>
                                </td>
                                <td align="center">
                                    &nbsp;<%# cose(Eval("QQ").ToString())%>
                                </td>
                            </tr>
                        </table>
                    </ItemTemplate>
                    <HeaderTemplate>
                        <table width="795" height="30" cellpadding="0" cellspacing="0" class="table_main1">
                            <tr>
                                <td align="center" width="50" bgcolor="#EEEEEE">
                                    <strong>选项</strong></td>
                                <td align="center" width="120" bgcolor="#EEEEEE">
                                    <strong>图片</strong></td>
                                <td align="center" width="250" bgcolor="#EEEEEE">
                                    <strong>标题</strong></td>
                                <td align="center" width="243" bgcolor="#EEEEEE">
                                    <strong>地区</strong></td>
                                <td align="center" bgcolor="#EEEEEE">
                                    <strong>在线QQ</strong></td>
                            </tr>
                        </table>
                    </HeaderTemplate>
                </asp:DataList>
            </asp:Panel>
            <asp:Panel ID="pnlPurchase" runat="server">
                <asp:DataList ID="dlstPurchase" runat="server" RepeatColumns="1" DataKeyField="ID"
                    CssClass="fl">
                    <ItemTemplate>
                        <table width="795" cellpadding="0" cellspacing="0" border="0" class="table_main1">
                            <tr>
                                <td width="50" align="center">
                                    <asp:CheckBox ID="CheckBox1" runat="server" />
                                </td>
                                <td width="120" align="center">
                                    <a href="<%=WebUrl %>Purchase/Detail.aspx?ID=<%# Eval("ProductID") %>" target="_blank">
                                        <asp:Image ID="Image2" runat="server" ImageUrl='<%# Base.Common.ProcessAbsoluteUrl(Eval("Picture_1").ToString()) %>'
                                            Width="80px" Height="80px" /></a>
                                </td>
                                <td width="250" align="center">
                                    <a href="<%=WebUrl %>Purchase/Detail.aspx?ID=<%# Eval("ProductID") %>" target="_blank">
                                        <%# Eval("Name")%>
                                        <br />
                                    </a><span style="color: Gray">
                                        <%# Eval("AddDate")%>
                                    </span>
                                </td>
                                <td align="center" width="243">
                                    &nbsp;<%# Eval("Province").ToString() == Eval("City").ToString() ? Eval("Province") :Eval("Province").ToString()+Eval("City").ToString()%>
                                </td>
                                <td align="center">
                                    &nbsp;<%# cose(Eval("QQ").ToString())%>
                                </td>
                            </tr>
                        </table>
                    </ItemTemplate>
                    <HeaderTemplate>
                        <table width="795" height="30" cellpadding="0" cellspacing="0" class="table_main1">
                            <tr>
                                <td align="center" width="50" bgcolor="#EEEEEE">
                                    <strong>选项</strong></td>
                                <td align="center" width="120" bgcolor="#EEEEEE">
                                    <strong>图片</strong></td>
                                <td align="center" width="250" bgcolor="#EEEEEE">
                                    <strong>标题</strong></td>
                                <td align="center" width="243" bgcolor="#EEEEEE">
                                    <strong>地区</strong></td>
                                <td align="center" bgcolor="#EEEEEE">
                                    <strong>在线QQ</strong></td>
                            </tr>
                        </table>
                    </HeaderTemplate>
                </asp:DataList>
            </asp:Panel>
            <asp:Panel ID="pnlCompany" runat="server">
                <asp:DataList ID="dlstCompany" runat="server" RepeatColumns="1" DataKeyField="ID"
                    CssClass="fl">
                    <ItemTemplate>
                        <table width="795" cellpadding="0" cellspacing="0" border="0" class="table_main1">
                            <tr>
                                <td width="50">
                                    <asp:CheckBox ID="CheckBox1" runat="server" />
                                </td>
                                <td>
                                    <p>
                                        <a href="<%=WebUrl %>Shop/Index/<%# Eval("LoginName") %><%=Rewrite %>" target="_blank">
                                            <%# Eval("CompanyName")%>
                                        </a>主营：<%# Eval("Product")%></p>
                                    </p>公司简介:<%# Base.Common.ClearHtml(Eval("Summary").ToString()).Trim().Length <= 30 ? Base.Common.ClearHtml(Eval("Summary").ToString()).Trim() : Base.Common.ClearHtml(Eval("Summary").ToString()).Trim().Substring(0, 30) + "..."%></p>
                                </td>
                                <td width="140">
                                    &nbsp;<%# Eval("Province").ToString() == Eval("City").ToString() ? Eval("Province") : Eval("Province").ToString()+Eval("City").ToString() %>
                                </td>
                                <td width="140">
                                    &nbsp;<%# cose(Eval("QQ").ToString())%>
                                </td>
                            </tr>
                        </table>
                    </ItemTemplate>
                    <HeaderTemplate>
                        <table width="795" height="30" cellpadding="0" cellspacing="0" class="table_main1">
                            <tr>
                                <td align="center" width="50" bgcolor="#EEEEEE">
                                    <strong>选项</strong></td>
                                <td align="center" bgcolor="#EEEEEE">
                                    <strong>公司/主营业务</strong></td>
                                <td align="center" width="140" bgcolor="#EEEEEE">
                                    <strong>地区</strong></td>
                                <td align="center" width="140" bgcolor="#EEEEEE">
                                    <strong>在线QQ</strong></td>
                            </tr>
                        </table>
                    </HeaderTemplate>
                </asp:DataList>
            </asp:Panel>
            <div class="paging">
                <p>
                    <asp:Label ID="lblPagination" runat="server" Text="Label"></asp:Label></p>
                <input id="CheckBox2" name="CheckBox2" onclick="SelectAll();" type="checkbox" />全选
                <asp:Button ID="btnDelete" runat="server" OnClick="btnDelete_Click" OnClientClick="return confirm('您确定要删除吗？')"
                    Text="批量删除" CssClass="i_button" />
            </div>
        </div>
    </form>
</asp:Content>
